<?php

namespace App\Models;

use App\User;
use Illuminate\Database\Eloquent\Model;

class CartItem extends Model
{
    protected $fillable=['amount'];
    public function user(){
        return $this->belongsTo(User::class);
    }
    public function productSku(){ //或取名 product_sku() 相应修改控制器预加载函数为 with('product_sku.product')
        return $this->belongsTo(ProductSku::class);
    }
}
